package app

import (
	"payme3000/api_gateway/internal/config"
	"payme3000/api_gateway/internal/logic"
	"payme3000/api_gateway/internal/repository"
	"payme3000/api_gateway/internal/server"
	"payme3000/framework/base"
)

type Application struct {
	base.Application
}

func NewApplication(
	cfg *config.Config,
	repo *repository.Repository,
	logic *logic.Logic,
	server *server.Server,
) *Application {
	return &Application{
		Application: base.Application{
			// 注册模块
			ModuleRegister: []base.IModule{
				// required
				cfg,
				repo,
				logic,
				server,
				// customized
			},
		},
	}
}
